<?php

namespace app\model;

use support\Model;

class AfterSale extends Model
{
    /**
     * The table associated with the model.
     *
     * @var string
     */
    protected $table = 'after_sales';

    /**
     * The primary key associated with the table.
     *
     * @var string
     */
    protected $primaryKey = 'id';

    /**
     * Indicates if the model should be timestamped.
     *
     * @var bool
     */
    // public $timestamps = true;


    public $fillable = [
        'sn',
        'door_date',
        'start_time',
        'end_time',
        'desc',
        'img_src',
        'channel',
        'user_id'
    ];


    function attachments()
    {
        return $this->hasMany(Attachment::class, 'after_sale_id', 'id');
    }
}